<?php	namespace Common\Model;
use Hdphp\Model\Model;
class Orderfrom extends Model
{
	protected $table = 'orderfrom';
	public function store($sessdata,$iid)
	{
//		p($sessdata);die;
		foreach ($sessdata as $k => $v) {
			$datas= array(
				'purchase'=>$v['num'],
				'indent_did'=>$iid,
				'shop_sid'=>$v['id'],
				'explain'=>implode(',', $v['options']),
				'subtotal'=>$v['total']
			);
			$this->add($datas);
		}
		return true;		
	}
}
